PdhRemoveCounter (VB)

The Visual Basic PdhRemoveCounterYQC0V2 function removes the counter entry identified by the CounterHandle parameter.

PdhRemoveCounter(

    ByVal CounterHandle as Long)

 

        as Long

 

 

Parameters

CounterHandle

The ID of the counter returned by the PdhAddCounterD1ESTY function.

 

Return Values

If the function succeeds, it returns a Long integer equal to ERROR_SUCCESS and the counter entry is deleted from the query.

If the function fails, the return value is a PDH error status defined in PDHDEFS.TXT. The following is a possible error value:

Value

Meaning

PDH_INVALID_HANDLE

The counter handle is not valid.